/**
 * @param {number[]} nums
 * @return {void} Do not return anything, modify nums in-place instead.
 */
var nextPermutation = function (nums) {
  const len = nums.length
  if (len > 1) {
    for (let i = len - 1; i > 0; i--) {
      if()
    }
  }
  return nums
};


console.log(nextPermutation([1, 2, 3]));



// [2,3,1,2,2,4]